﻿using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;

class ExtractFromXML
{
    static void Main()
    {
        using (StreamReader input = new StreamReader("input.txt"))
        {
            using (StreamWriter output = new StreamWriter("output.txt"))
            {
                string currentLine;
                bool isInTag = false;

                while ((currentLine = input.ReadLine()) != null)
                {
                    StringBuilder textWIthRemovedTags = new StringBuilder();
                    for (int i = 0; i < currentLine.Length; i++)
                    {
                        if (currentLine[i] == '<')
                        {
                            isInTag = true;
                            continue;
                        }
                        else if (currentLine[i] == '>')
                        {
                            isInTag = false;
                            continue;
                        }
                        else if (!isInTag)
                        {
                            textWIthRemovedTags.Append(currentLine[i]);
                        }
                    }

                    output.WriteLine(textWIthRemovedTags);
                }
            }
        }
    }
}